package com.google.code.pomhelper.graph;

/**
 * Provides tokens to use when printing the modules.
 */
public class Tokens {
	private final String nodeIndent;
	private final String lastNodeIndent;
	private final String fillIndent;
	private final String lastFillIndent;

	public Tokens(String nodeIndent, String lastNodeIndent, String fillIndent, String lastFillIndent) {
		this.nodeIndent = nodeIndent;
		this.lastNodeIndent = lastNodeIndent;
		this.fillIndent = fillIndent;
		this.lastFillIndent = lastFillIndent;
	}

	public String getNodeIndent(boolean last) {
		if (last) {
			return lastNodeIndent;
		} else {
			return nodeIndent;
		}
	}

	public String getFillIndent(boolean last) {
		if (last) {
			return lastFillIndent;
		} else {
			return fillIndent;
		}
	}

	public static final Tokens STANDARD_TOKENS = new Tokens("+- ", "\\- ", "|  ", "   ");
}
